num=input("请输入（1-5位整数）：")
digits = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']
units = ['', '拾', '佰', '仟', '万']
num_str = str(num)
result = []

for i in range(len(num_str)):
    digit = int(num_str[i])
    pos = len(num_str) - i - 1

    if digit == 0:
        if result and result[-1] != '零':
            result.append('零')
    else:
        result.append(digits[digit] + units[pos])

chinese = ''.join(result)

if chinese.startswith('壹拾'):
    chinese = chinese[1:]
chinese = chinese.replace('零零', '零').rstrip('零')

print(f"{chinese}元整")